package
{
	import net.flashpunk.Entity;
	import net.flashpunk.utils.Draw;
	import net.flashpunk.graphics.Image;
	import net.flashpunk.graphics.Tilemap;
	import net.flashpunk.FP;
	/**
	 * © 2012 TheJavaArcade.com
	 */	
	public class Wall extends Entity {
		public var tile:Vector.<Tilemap> = new Vector.<Tilemap>;
		public var wallType:String;
		public var state:int;//0 red, 1 yellow
		
		public function Wall(totalSegs:int, number:int, theState:int = 0 ) {
			state = theState;
			if (totalSegs == 4) {//level 1
				if (number == 0) { x = 10; y = 20; width = 580; height = 10; wallType = "horizontal"; }
				if (number == 1) { x = 590; y = 30; width = 10; height = 440; wallType = "vertical";}
				if (number == 2) { x = 10; y = 470; width = 580; height = 10; wallType = "horizontal";}
				if (number == 3) { x = 0; y = 30; width = 10; height = 440; wallType = "vertical";}				
			}
			if (totalSegs == 6) {//level 2
				if (number == 0) { x = 10; y = 20; width = 290; height = 10; wallType = "horizontal"; }
				if (number == 1) { x = 300; y = 20; width = 290; height = 10; wallType = "horizontal"; }
				if (number == 2) { x = 590; y = 30; width = 10; height = 440; wallType = "vertical";}
				if (number == 3) { x = 300; y = 470; width = 290; height = 10; wallType = "horizontal"; }
				if (number == 4) { x = 10; y = 470; width = 290; height = 10; wallType = "horizontal"; }
				if (number == 5) { x = 0; y = 30; width = 10; height = 440; wallType = "vertical";}				
			}
			if (totalSegs == 8) {//level 3
				if (number == 0) { x = 10; y = 20; width = 290; height = 10; wallType = "horizontal"; }
				if (number == 1) { x = 300; y = 20; width = 290; height = 10; wallType = "horizontal"; }
				if (number == 2) { x = 590; y = 30; width = 10; height = 220; wallType = "vertical"; }
				if (number == 3) { x = 590; y = 250; width = 10; height = 220; wallType = "vertical"; }
				if (number == 4) { x = 300; y = 470; width = 290; height = 10; wallType = "horizontal"; }
				if (number == 5) { x = 10; y = 470; width = 290; height = 10; wallType = "horizontal"; }
				if (number == 6) { x = 0; y = 250; width = 10; height = 220; wallType = "vertical"; }
				if (number == 7) { x = 0; y = 30; width = 10; height = 220; wallType = "vertical"; }				
			}
			if (totalSegs == 10) {//level 4
				if (number == 0) { x = 10; y = 20; width = 193; height = 10; wallType = "horizontal"; }
				if (number == 1) { x = 203; y = 20; width = 194; height = 10; wallType = "horizontal"; }
				if (number == 2) { x = 397; y = 20; width = 193; height = 10; wallType = "horizontal"; }
				
				if (number == 3) { x = 590; y = 30; width = 10; height = 220; wallType = "vertical"; }
				if (number == 4) { x = 590; y = 250; width = 10; height = 220; wallType = "vertical"; }
				
				if (number == 5) { x = 397; y = 470; width = 193; height = 10; wallType = "horizontal"; }
				if (number == 6) { x = 203; y = 470; width = 194; height = 10; wallType = "horizontal"; }
				if (number == 7) { x = 10; y = 470; width = 193; height = 10; wallType = "horizontal"; }
				
				if (number == 8) { x = 0; y = 250; width = 10; height = 220; wallType = "vertical"; }
				if (number == 9) { x = 0; y = 30; width = 10; height = 220; wallType = "vertical"; }				
			}
			if (totalSegs == 12) {//level 5
				if (number == 0) { x = 10; y = 20; width = 193; height = 10; wallType = "horizontal"; }
				if (number == 1) { x = 203; y = 20; width = 194; height = 10; wallType = "horizontal"; }
				if (number == 2) { x = 397; y = 20; width = 193; height = 10; wallType = "horizontal"; }
				
				if (number == 3) { x = 590; y = 30; width = 10; height = 146; wallType = "vertical"; }
				if (number == 4) { x = 590; y = 176; width = 10; height = 148; wallType = "vertical"; }
				if (number == 5) { x = 590; y = 324; width = 10; height = 146; wallType = "vertical"; }
				
				if (number == 6) { x = 397; y = 470; width = 193; height = 10; wallType = "horizontal"; }
				if (number == 7) { x = 203; y = 470; width = 194; height = 10; wallType = "horizontal"; }
				if (number == 8) { x = 10; y = 470; width = 193; height = 10; wallType = "horizontal"; }
				
				if (number == 9) { x = 0; y = 324; width = 10; height = 146; wallType = "vertical"; }
				if (number == 10) { x = 0; y = 176; width = 10; height = 148; wallType = "vertical"; }
				if (number == 11) { x = 0; y = 30; width = 10; height = 146; wallType = "vertical"; }
			}
			if (totalSegs == 14) {//level 6
				if (number == 0) { x = 10; y = 20; width = 145; height = 10; wallType = "horizontal"; }
				if (number == 1) { x = 155; y = 20; width = 145; height = 10; wallType = "horizontal"; }
				if (number == 2) { x = 300; y = 20; width = 145; height = 10; wallType = "horizontal"; }
				if (number == 3) { x = 445; y = 20; width = 145; height = 10; wallType = "horizontal"; }
				
				if (number == 4) { x = 590; y = 30; width = 10; height = 146; wallType = "vertical"; }
				if (number == 5) { x = 590; y = 176; width = 10; height = 148; wallType = "vertical"; }
				if (number == 6) { x = 590; y = 324; width = 10; height = 146; wallType = "vertical"; }
				
				if (number == 7) { x = 445; y = 470; width = 145; height = 10; wallType = "horizontal"; }
				if (number == 8) { x = 300; y = 470; width = 145; height = 10; wallType = "horizontal"; }
				if (number == 9) { x = 155; y = 470; width = 145; height = 10; wallType = "horizontal"; }
				if (number == 10) { x = 10; y = 470; width = 145; height = 10; wallType = "horizontal"; }
				
				if (number == 11) { x = 0; y = 324; width = 10; height = 146; wallType = "vertical"; }
				if (number == 12) { x = 0; y = 176; width = 10; height = 148; wallType = "vertical"; }
				if (number == 13) { x = 0; y = 30; width = 10; height = 146; wallType = "vertical"; }
			}
			if (totalSegs == 16) {//level 7
				if (number == 0) { x = 10; y = 20; width = 145; height = 10; wallType = "horizontal"; }
				if (number == 1) { x = 155; y = 20; width = 145; height = 10; wallType = "horizontal"; }
				if (number == 2) { x = 300; y = 20; width = 145; height = 10; wallType = "horizontal"; }
				if (number == 3) { x = 445; y = 20; width = 145; height = 10; wallType = "horizontal"; }
				
				if (number == 4) { x = 590; y = 30; width = 10; height = 110; wallType = "vertical"; }
				if (number == 5) { x = 590; y = 140; width = 10; height = 110; wallType = "vertical"; }
				if (number == 6) { x = 590; y = 250; width = 10; height = 110; wallType = "vertical"; }
				if (number == 7) { x = 590; y = 360; width = 10; height = 110; wallType = "vertical"; }
				
				if (number == 8) { x = 445; y = 470; width = 145; height = 10; wallType = "horizontal"; }
				if (number == 9) { x = 300; y = 470; width = 145; height = 10; wallType = "horizontal"; }
				if (number == 10) { x = 155; y = 470; width = 145; height = 10; wallType = "horizontal"; }
				if (number == 11) { x = 10; y = 470; width = 145; height = 10; wallType = "horizontal"; }
				
				if (number == 12) { x = 0; y = 360; width = 10; height = 110; wallType = "vertical"; }
				if (number == 13) { x = 0; y = 250; width = 10; height = 110; wallType = "vertical"; }
				if (number == 14) { x = 0; y = 140; width = 10; height = 110; wallType = "vertical"; }
				if (number == 15) { x = 0; y = 30; width = 10; height = 110; wallType = "vertical"; }
			}
			
			if (totalSegs == 18) {//level 8
				if (number == 0) { x = 10; y = 20; width = 116; height = 10; wallType = "horizontal"; }
				if (number == 1) { x = 126; y = 20; width = 116; height = 10; wallType = "horizontal"; }
				if (number == 2) { x = 242; y = 20; width = 116; height = 10; wallType = "horizontal"; }
				if (number == 3) { x = 358; y = 20; width = 116; height = 10; wallType = "horizontal"; }
				if (number == 4) { x = 474; y = 20; width = 116; height = 10; wallType = "horizontal"; }
				
				if (number == 5) { x = 590; y = 30; width = 10; height = 110; wallType = "vertical"; }
				if (number == 6) { x = 590; y = 140; width = 10; height = 110; wallType = "vertical"; }
				if (number == 7) { x = 590; y = 250; width = 10; height = 110; wallType = "vertical"; }
				if (number == 8) { x = 590; y = 360; width = 10; height = 110; wallType = "vertical"; }
				
				if (number == 9) { x = 474; y = 470; width = 116; height = 10; wallType = "horizontal"; }
				if (number == 10) { x = 358; y = 470; width = 116; height = 10; wallType = "horizontal"; }
				if (number == 11) { x = 242; y = 470; width = 116; height = 10; wallType = "horizontal"; }
				if (number == 12) { x = 126; y = 470; width = 116; height = 10; wallType = "horizontal"; }
				if (number == 13) { x = 10; y = 470; width = 116; height = 10; wallType = "horizontal"; }
				
				if (number == 14) { x = 0; y = 360; width = 10; height = 110; wallType = "vertical"; }
				if (number == 15) { x = 0; y = 250; width = 10; height = 110; wallType = "vertical"; }
				if (number == 16) { x = 0; y = 140; width = 10; height = 110; wallType = "vertical"; }
				if (number == 17) { x = 0; y = 30; width = 10; height = 110; wallType = "vertical"; }
			}
			if (totalSegs == 20) {//level 9
				if (number == 0) { x = 10; y = 20; width = 116; height = 10; wallType = "horizontal"; }
				if (number == 1) { x = 126; y = 20; width = 116; height = 10; wallType = "horizontal"; }
				if (number == 2) { x = 242; y = 20; width = 116; height = 10; wallType = "horizontal"; }
				if (number == 3) { x = 358; y = 20; width = 116; height = 10; wallType = "horizontal"; }
				if (number == 4) { x = 474; y = 20; width = 116; height = 10; wallType = "horizontal"; }
				
				if (number == 5) { x = 590; y = 30; width = 10; height = 88; wallType = "vertical"; }
				if (number == 6) { x = 590; y = 118; width = 10; height = 88; wallType = "vertical"; }
				if (number == 7) { x = 590; y = 206; width = 10; height = 88; wallType = "vertical"; }
				if (number == 8) { x = 590; y = 294; width = 10; height = 88; wallType = "vertical"; }
				if (number == 9) { x = 590; y = 382; width = 10; height = 88; wallType = "vertical"; }
				
				if (number == 10) { x = 474; y = 470; width = 116; height = 10; wallType = "horizontal"; }
				if (number == 11) { x = 358; y = 470; width = 116; height = 10; wallType = "horizontal"; }
				if (number == 12) { x = 242; y = 470; width = 116; height = 10; wallType = "horizontal"; }
				if (number == 13) { x = 126; y = 470; width = 116; height = 10; wallType = "horizontal"; }
				if (number == 14) { x = 10; y = 470; width = 116; height = 10; wallType = "horizontal"; }
				
				if (number == 15) { x = 0; y = 382; width = 10; height = 88; wallType = "vertical"; }
				if (number == 16) { x = 0; y = 294; width = 10; height = 88; wallType = "vertical"; }
				if (number == 17) { x = 0; y = 206; width = 10; height = 88; wallType = "vertical"; }
				if (number == 18) { x = 0; y = 118; width = 10; height = 88; wallType = "vertical"; }
				if (number == 19) { x = 0; y = 30; width = 10; height = 88; wallType = "vertical"; }
			}
			if (totalSegs == 22) {//level 10
				if (number == 0) { x = 10; y = 20; width = 96; height = 10; wallType = "horizontal"; }
				if (number == 1) { x = 106; y = 20; width = 97; height = 10; wallType = "horizontal"; }
				if (number == 2) { x = 203; y = 20; width = 97; height = 10; wallType = "horizontal"; }
				if (number == 3) { x = 300; y = 20; width = 97; height = 10; wallType = "horizontal"; }
				if (number == 4) { x = 397; y = 20; width = 97; height = 10; wallType = "horizontal"; }
				if (number == 5) { x = 494; y = 20; width = 96; height = 10; wallType = "horizontal"; }
				
				if (number == 6) { x = 590; y = 30; width = 10; height = 88; wallType = "vertical"; }
				if (number == 7) { x = 590; y = 118; width = 10; height = 88; wallType = "vertical"; }
				if (number == 8) { x = 590; y = 206; width = 10; height = 88; wallType = "vertical"; }
				if (number == 9) { x = 590; y = 294; width = 10; height = 88; wallType = "vertical"; }
				if (number == 10) { x = 590; y = 382; width = 10; height = 88; wallType = "vertical"; }
				
				if (number == 11) { x = 494; y = 470; width = 96; height = 10; wallType = "horizontal"; }
				if (number == 12) { x = 397; y = 470; width = 97; height = 10; wallType = "horizontal"; }
				if (number == 13) { x = 300; y = 470; width = 97; height = 10; wallType = "horizontal"; }
				if (number == 14) { x = 203; y = 470; width = 97; height = 10; wallType = "horizontal"; }
				if (number == 15) { x = 106; y = 470; width = 97; height = 10; wallType = "horizontal"; }
				if (number == 16) { x = 10; y = 470; width = 96; height = 10; wallType = "horizontal"; }
				
				if (number == 17) { x = 0; y = 382; width = 10; height = 88; wallType = "vertical"; }
				if (number == 18) { x = 0; y = 294; width = 10; height = 88; wallType = "vertical"; }
				if (number == 19) { x = 0; y = 206; width = 10; height = 88; wallType = "vertical"; }
				if (number == 20) { x = 0; y = 118; width = 10; height = 88; wallType = "vertical"; }
				if (number == 21) { x = 0; y = 30; width = 10; height = 88; wallType = "vertical"; }
			}
			if (totalSegs == 24) {//level 11
				if (number == 0) { x = 10; y = 20; width = 96; height = 10; wallType = "horizontal"; }
				if (number == 1) { x = 106; y = 20; width = 97; height = 10; wallType = "horizontal"; }
				if (number == 2) { x = 203; y = 20; width = 97; height = 10; wallType = "horizontal"; }
				if (number == 3) { x = 300; y = 20; width = 97; height = 10; wallType = "horizontal"; }
				if (number == 4) { x = 397; y = 20; width = 97; height = 10; wallType = "horizontal"; }
				if (number == 5) { x = 494; y = 20; width = 96; height = 10; wallType = "horizontal"; }
				
				if (number == 6) { x = 590; y = 30; width = 10; height = 74; wallType = "vertical"; }
				if (number == 7) { x = 590; y = 104; width = 10; height = 73; wallType = "vertical"; }
				if (number == 8) { x = 590; y = 177; width = 10; height = 73; wallType = "vertical"; }
				if (number == 9) { x = 590; y = 250; width = 10; height = 73; wallType = "vertical"; }
				if (number == 10) { x = 590; y = 323; width = 10; height = 73; wallType = "vertical"; }
				if (number == 11) { x = 590; y = 396; width = 10; height = 74; wallType = "vertical"; }
				
				if (number == 12) { x = 494; y = 470; width = 96; height = 10; wallType = "horizontal"; }
				if (number == 13) { x = 397; y = 470; width = 97; height = 10; wallType = "horizontal"; }
				if (number == 14) { x = 300; y = 470; width = 97; height = 10; wallType = "horizontal"; }
				if (number == 15) { x = 203; y = 470; width = 97; height = 10; wallType = "horizontal"; }
				if (number == 16) { x = 106; y = 470; width = 97; height = 10; wallType = "horizontal"; }
				if (number == 17) { x = 10; y = 470; width = 96; height = 10; wallType = "horizontal"; }
				
				if (number == 18) { x = 0; y = 396; width = 10; height = 74; wallType = "vertical"; }
				if (number == 19) { x = 0; y = 323; width = 10; height = 73; wallType = "vertical"; }
				if (number == 20) { x = 0; y = 250; width = 10; height = 73; wallType = "vertical"; }
				if (number == 21) { x = 0; y = 177; width = 10; height = 73; wallType = "vertical"; }
				if (number == 22) { x = 0; y = 104; width = 10; height = 73; wallType = "vertical"; }
				if (number == 23) { x = 0; y = 30; width = 10; height = 74; wallType = "vertical"; }
			}
			if (totalSegs == 26) {//level 12
				if (number == 0) { x = 10; y = 20; width = 83; height = 10; wallType = "horizontal"; }
				if (number == 1) { x = 93; y = 20; width = 83; height = 10; wallType = "horizontal"; }
				if (number == 2) { x = 176; y = 20; width = 83; height = 10; wallType = "horizontal"; }
				if (number == 3) { x = 259; y = 20; width = 82; height = 10; wallType = "horizontal"; }
				if (number == 4) { x = 341; y = 20; width = 83; height = 10; wallType = "horizontal"; }
				if (number == 5) { x = 424; y = 20; width = 83; height = 10; wallType = "horizontal"; }
				if (number == 6) { x = 507; y = 20; width = 83; height = 10; wallType = "horizontal"; }
				
				if (number == 7) { x = 590; y = 30; width = 10; height = 74; wallType = "vertical"; }
				if (number == 8) { x = 590; y = 104; width = 10; height = 73; wallType = "vertical"; }
				if (number == 9) { x = 590; y = 177; width = 10; height = 73; wallType = "vertical"; }
				if (number == 10) { x = 590; y = 250; width = 10; height = 73; wallType = "vertical"; }
				if (number == 11) { x = 590; y = 323; width = 10; height = 73; wallType = "vertical"; }
				if (number == 12) { x = 590; y = 396; width = 10; height = 74; wallType = "vertical"; }
				
				if (number == 13) { x = 507; y = 470; width = 83; height = 10; wallType = "horizontal"; }
				if (number == 14) { x = 424; y = 470; width = 83; height = 10; wallType = "horizontal"; }
				if (number == 15) { x = 341; y = 470; width = 83; height = 10; wallType = "horizontal"; }
				if (number == 16) { x = 259; y = 470; width = 82; height = 10; wallType = "horizontal"; }
				if (number == 17) { x = 176; y = 470; width = 83; height = 10; wallType = "horizontal"; }
				if (number == 18) { x = 93; y = 470; width = 83; height = 10; wallType = "horizontal"; }
				if (number == 19) { x = 10; y = 470; width = 83; height = 10; wallType = "horizontal"; }
				
				if (number == 20) { x = 0; y = 396; width = 10; height = 74; wallType = "vertical"; }
				if (number == 21) { x = 0; y = 323; width = 10; height = 73; wallType = "vertical"; }
				if (number == 22) { x = 0; y = 250; width = 10; height = 73; wallType = "vertical"; }
				if (number == 23) { x = 0; y = 177; width = 10; height = 73; wallType = "vertical"; }
				if (number == 24) { x = 0; y = 104; width = 10; height = 73; wallType = "vertical"; }
				if (number == 25) { x = 0; y = 30; width = 10; height = 74; wallType = "vertical"; }
			}
			if (totalSegs == 28) {//level 13
				if (number == 0) { x = 10; y = 20; width = 73; height = 10; wallType = "horizontal"; }
				if (number == 1) { x = 83; y = 20; width = 73; height = 10; wallType = "horizontal"; }
				if (number == 2) { x = 156; y = 20; width = 72; height = 10; wallType = "horizontal"; }
				if (number == 3) { x = 228; y = 20; width = 72; height = 10; wallType = "horizontal"; }
				if (number == 4) { x = 300; y = 20; width = 72; height = 10; wallType = "horizontal"; }
				if (number == 5) { x = 372; y = 20; width = 72; height = 10; wallType = "horizontal"; }
				if (number == 6) { x = 444; y = 20; width = 73; height = 10; wallType = "horizontal"; }
				if (number == 7) { x = 517; y = 20; width = 73; height = 10; wallType = "horizontal"; }
				
				if (number == 8) { x = 590; y = 30; width = 10; height = 74; wallType = "vertical"; }
				if (number == 9) { x = 590; y = 104; width = 10; height = 73; wallType = "vertical"; }
				if (number == 10) { x = 590; y = 177; width = 10; height = 73; wallType = "vertical"; }
				if (number == 11) { x = 590; y = 250; width = 10; height = 73; wallType = "vertical"; }
				if (number == 12) { x = 590; y = 323; width = 10; height = 73; wallType = "vertical"; }
				if (number == 13) { x = 590; y = 396; width = 10; height = 74; wallType = "vertical"; }
				
				if (number == 14) { x = 517; y = 470; width = 73; height = 10; wallType = "horizontal"; }
				if (number == 15) { x = 444; y = 470; width = 73; height = 10; wallType = "horizontal"; }
				if (number == 16) { x = 372; y = 470; width = 72; height = 10; wallType = "horizontal"; }
				if (number == 17) { x = 300; y = 470; width = 72; height = 10; wallType = "horizontal"; }
				if (number == 18) { x = 228; y = 470; width = 72; height = 10; wallType = "horizontal"; }
				if (number == 19) { x = 156; y = 470; width = 72; height = 10; wallType = "horizontal"; }
				if (number == 20) { x = 83; y = 470; width = 73; height = 10; wallType = "horizontal"; }
				if (number == 21) { x = 10; y = 470; width = 73; height = 10; wallType = "horizontal"; }
				
				if (number == 22) { x = 0; y = 396; width = 10; height = 74; wallType = "vertical"; }
				if (number == 23) { x = 0; y = 323; width = 10; height = 73; wallType = "vertical"; }
				if (number == 24) { x = 0; y = 250; width = 10; height = 73; wallType = "vertical"; }
				if (number == 25) { x = 0; y = 177; width = 10; height = 73; wallType = "vertical"; }
				if (number == 26) { x = 0; y = 104; width = 10; height = 73; wallType = "vertical"; }
				if (number == 27) { x = 0; y = 30; width = 10; height = 74; wallType = "vertical"; }
			}
			if (totalSegs == 30) {//level 14
				if (number == 0) { x = 10; y = 20; width = 73; height = 10; wallType = "horizontal"; }
				if (number == 1) { x = 83; y = 20; width = 73; height = 10; wallType = "horizontal"; }
				if (number == 2) { x = 156; y = 20; width = 72; height = 10; wallType = "horizontal"; }
				if (number == 3) { x = 228; y = 20; width = 72; height = 10; wallType = "horizontal"; }
				if (number == 4) { x = 300; y = 20; width = 72; height = 10; wallType = "horizontal"; }
				if (number == 5) { x = 372; y = 20; width = 72; height = 10; wallType = "horizontal"; }
				if (number == 6) { x = 444; y = 20; width = 73; height = 10; wallType = "horizontal"; }
				if (number == 7) { x = 517; y = 20; width = 73; height = 10; wallType = "horizontal"; }
				
				if (number == 8) { x = 590; y = 30; width = 10; height = 63; wallType = "vertical"; }
				if (number == 9) { x = 590; y = 93; width = 10; height = 63; wallType = "vertical"; }
				if (number == 10) { x = 590; y = 156; width = 10; height = 63; wallType = "vertical"; }
				if (number == 11) { x = 590; y = 219; width = 10; height = 62; wallType = "vertical"; }
				if (number == 12) { x = 590; y = 281; width = 10; height = 63; wallType = "vertical"; }
				if (number == 13) { x = 590; y = 344; width = 10; height = 63; wallType = "vertical"; }
				if (number == 14) { x = 590; y = 407; width = 10; height = 63; wallType = "vertical"; }
				
				if (number == 15) { x = 517; y = 470; width = 73; height = 10; wallType = "horizontal"; }
				if (number == 16) { x = 444; y = 470; width = 73; height = 10; wallType = "horizontal"; }
				if (number == 17) { x = 372; y = 470; width = 72; height = 10; wallType = "horizontal"; }
				if (number == 18) { x = 300; y = 470; width = 72; height = 10; wallType = "horizontal"; }
				if (number == 19) { x = 228; y = 470; width = 72; height = 10; wallType = "horizontal"; }
				if (number == 20) { x = 156; y = 470; width = 72; height = 10; wallType = "horizontal"; }
				if (number == 21) { x = 83; y = 470; width = 73; height = 10; wallType = "horizontal"; }
				if (number == 22) { x = 10; y = 470; width = 73; height = 10; wallType = "horizontal"; }
				
				if (number == 23) { x = 0; y = 407; width = 10; height = 63; wallType = "vertical"; }
				if (number == 24) { x = 0; y = 344; width = 10; height = 63; wallType = "vertical"; }
				if (number == 25) { x = 0; y = 281; width = 10; height = 63; wallType = "vertical"; }
				if (number == 26) { x = 0; y = 219; width = 10; height = 62; wallType = "vertical"; }
				if (number == 27) { x = 0; y = 156; width = 10; height = 63; wallType = "vertical"; }
				if (number == 28) { x = 0; y = 93; width = 10; height = 63; wallType = "vertical"; }
				if (number == 29) { x = 0; y = 30; width = 10; height = 63; wallType = "vertical"; }
			}
			if (totalSegs == 32) {//level 15
				if (number == 0) { x = 10; y = 20; width = 65; height = 10; wallType = "horizontal"; }
				if (number == 1) { x = 75; y = 20; width = 64; height = 10; wallType = "horizontal"; }
				if (number == 2) { x = 139; y = 20; width = 64; height = 10; wallType = "horizontal"; }
				if (number == 3) { x = 203; y = 20; width = 64; height = 10; wallType = "horizontal"; }
				if (number == 4) { x = 267; y = 20; width = 65; height = 10; wallType = "horizontal"; }
				if (number == 5) { x = 332; y = 20; width = 64; height = 10; wallType = "horizontal"; }
				if (number == 6) { x = 396; y = 20; width = 64; height = 10; wallType = "horizontal"; }
				if (number == 7) { x = 460; y = 20; width = 64; height = 10; wallType = "horizontal"; }
				if (number == 8) { x = 524; y = 20; width = 65; height = 10; wallType = "horizontal"; }
				
				if (number == 9) { x = 590; y = 30; width = 10; height = 63; wallType = "vertical"; }
				if (number == 10) { x = 590; y = 93; width = 10; height = 63; wallType = "vertical"; }
				if (number == 11) { x = 590; y = 156; width = 10; height = 63; wallType = "vertical"; }
				if (number == 12) { x = 590; y = 219; width = 10; height = 62; wallType = "vertical"; }
				if (number == 13) { x = 590; y = 281; width = 10; height = 63; wallType = "vertical"; }
				if (number == 14) { x = 590; y = 344; width = 10; height = 63; wallType = "vertical"; }
				if (number == 15) { x = 590; y = 407; width = 10; height = 63; wallType = "vertical"; }
				
				if (number == 16) { x = 524; y = 470; width = 64; height = 10; wallType = "horizontal"; }
				if (number == 17) { x = 460; y = 470; width = 63; height = 10; wallType = "horizontal"; }
				if (number == 18) { x = 396; y = 470; width = 63; height = 10; wallType = "horizontal"; }
				if (number == 19) { x = 332; y = 470; width = 63; height = 10; wallType = "horizontal"; }
				if (number == 20) { x = 267; y = 470; width = 64; height = 10; wallType = "horizontal"; }
				if (number == 21) { x = 203; y = 470; width = 63; height = 10; wallType = "horizontal"; }
				if (number == 22) { x = 139; y = 470; width = 63; height = 10; wallType = "horizontal"; }
				if (number == 23) { x = 75; y = 470; width = 63; height = 10; wallType = "horizontal"; }
				if (number == 24) { x = 10; y = 470; width = 64; height = 10; wallType = "horizontal"; }
				
				if (number == 25) { x = 0; y = 407; width = 10; height = 63; wallType = "vertical"; }
				if (number == 26) { x = 0; y = 344; width = 10; height = 63; wallType = "vertical"; }
				if (number == 27) { x = 0; y = 281; width = 10; height = 63; wallType = "vertical"; }
				if (number == 28) { x = 0; y = 219; width = 10; height = 62; wallType = "vertical"; }
				if (number == 29) { x = 0; y = 156; width = 10; height = 63; wallType = "vertical"; }
				if (number == 30) { x = 0; y = 93; width = 10; height = 63; wallType = "vertical"; }
				if (number == 31) { x = 0; y = 30; width = 10; height = 63; wallType = "vertical"; }
			}	
			
			if (wallType == "horizontal") {
				tile[0] = new Tilemap(Assets.WALL_BLUE_V, width, 10, 1, 10);
				tile[1] = new Tilemap(Assets.WALL_GREEN_V, width, 10, 1, 10);
				for (var i:int = 1; i < width-2; i++) {
					tile[0].setTile(i, 0, 0);
					tile[1].setTile(i, 0, 0);
				}
			}
			if (wallType == "vertical") {
				tile[0] = new Tilemap(Assets.WALL_BLUE_H, 10, height, 10, 1);
				tile[1] = new Tilemap(Assets.WALL_GREEN_H, 10, height, 10, 1);
				for (var j:int = 1; j < height-2; j++) {
					tile[0].setTile(0, j, 0);
					tile[1].setTile(0, j, 0);
				}
			}
				
			setHitbox(width, height, 0, 0);
			type = "wall";
			layer = 0;
		}
		override public function update():void {
			if (collide("ball", x - GameWorld.ball.x_velocity , y) || collide("ball", x, y - GameWorld.ball.y_velocity)) {
				GameWorld.theMusic.isPlaying = true;
				if (state == 0) state = 1; else state = 0;
				if (state == 0) {
					GameWorld.theMusic.noteCount = 0;
					GameWorld.theMusic.octave = 0;
				}
				if (state == 1) {
					GameWorld.theMusic.noteCount = 0;
					GameWorld.theMusic.octave = 1;
				}
			}
			graphic = tile[state];
			
		}
		
	}

}